/*
* $Id: DeleteQBFamilyOperation.cpp 153 2010-09-26 17:33:07Z volok-aleksej@yandex.ru $
*
* Copyright 2010 by Volokitin Alexey
* All rights reserved
*
*/
#include "Common/include.h"
#include "DeleteQBFamilyOperation.h"
#include "../SqlBinder.h"
#include "../Tables/TableNames.h"

CDeleteQBFamilyOperation::CDeleteQBFamilyOperation(){}
CDeleteQBFamilyOperation::~CDeleteQBFamilyOperation(){}
void CDeleteQBFamilyOperation::DeleteValue(IDatabase* pDatabase){
	std::tstring strRequest = _T("UPDATE ");
	CSqlBinder binder(strRequest + QUEEN_BEE_TABLE_NAME
		+ _T(" SET id_family=0 WHERE id_family=?;"));
	binder.SetValue(0, m_content.s_nId);
	pDatabase->ExecRequest(binder.GetRequest());
	m_content.Clear();
}

CDeleteQBFamilyOperation::content::content(){
	Clear();
}
void CDeleteQBFamilyOperation::content::Clear(){
	s_nId = 0;
}